fix(mysql): Work around for Issue #2206 (ColumnNotFound error when querying)#4086
Open
duelafn wants to merge 2 commits intolaunchbadge:mainfrom
Open
fix(mysql): Work around for Issue #2206 (ColumnNotFound error when querying)#4086duelafn wants to merge 2 commits intolaunchbadge:mainfrom
duelafn wants to merge 2 commits intolaunchbadge:mainfrom
Conversation
794a3e0 to
f85a70c
Compare
abonander
reviewed
Feb 6, 2026
abonander
requested changes
Feb 6, 2026
MariaDB may change the column info between PREPARE and EXECUTE if the schema changes (https://jira.mariadb.org/browse/MDEV-27013). Therefore, always read column info from the execute metadata and use it for the row column_names field. Fixes: launchbadge#2206, launchbadge#1530
Author
|
Hello, thanks for the review. I'm not entirely clear on what changes you are proposing, but as a guess I've updated the pull request to ignore This does open the sitution that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the test case in #2206 (comment).
I realize that this may not be the best fix for the issue, so consider this a conversation starter PR. The comments in the mysql
connection/executor.rssuggest that column information may be delayed until first result, but where and how exactly that is supposed to happen wasn't clear to me and the column information is not currently being updated appropriately. This patch catches such situations and compensates. A better fix would find where the update should have happend -- I just don't know where or how to do that.Does your PR solve an issue?
fixes #2206
Is this a breaking change?
This change may cause some code which previously returned
Err(ColumnNotFound)to now returnOk(value). This is a bug fix so the user code expected to receiveOk(value)but this is technically a change in behavior.